package com.example.springboot.dao;

import com.example.springboot.entity.Introduce;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

@Repository
public interface IntroduceDao extends Mapper<Introduce> {


    @Select("select * from introduce where `id` = #{id}")
    Introduce findById(@Param("id")Integer id);

    List<Introduce> findBySearch(@Param("search") Introduce search);

    @Select("select * from introduce order by time desc limit 8")
    List<Introduce> getNewdata();



}

